<layout name="page" />
<block name="content">
	{:widget('page_header/adv_search',array('name'=>'考勤统计','search'=>'M'))}
	<form method="post" name="form_adv_search" id="form_adv_search">
		<div class="adv_search panel panel-default  hidden"  id="adv_search">
			<div class="panel-heading">
				<div class="row">
					<h4 class="col-xs-6">高级搜索</h4>
					<div class="col-xs-6 text-right">
						<a  class="btn btn-info" id="submit_adv_search">搜索</a>
						<a  class="btn " id="close_adv_search">关闭</a>
					</div>
				</div>
			</div>
			<div class="x-panel-body">
				<eq name="auth.admin" value="true">
					
						<label class="input-label" for="eq_dept_id">部门：</label>
						
							<select class="input" name="eq_dept_id">
								<option value="">选择部门</option>
								{$dept_list}
							</select>
						</div>
					</div>
					
						<label class="input-label" for="eq_user_id">登录人：</label>
						
							<select class="input" name="eq_user_id" >
								<option value="">选择人员</option>
								{:fill_option($emp_list)};
							</select>
						</div>
					</div>
				</eq>
				
					<label class="input-label" for="content">类型：</label>
					
						<select class="input" name="eq_type" >
							<option value="">全部</option>
							<option value="sign_in">签到</option>
							<option value="sign_out">签退</option>
							<option value="outside">外勤</option>
						</select>
					</div>
				</div>
				
					<label class="input-label" for="be_create_time">登录时间：</label>
					
						<div class="input-daterange input-group" >
							<input type="text" class="input-sm input text-center" name="be_create_time" readonly="readonly"/>
							<span class="input-group-addon">-</span>
							<input type="text" class="input-sm input text-center" name="en_create_time" readonly="readonly"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
	<div class="x-panel hidden">
		<div class="x-panel-body">
			<div class="pull-right">
				<a class="btn" onclick="add()">查看位置</a>
			</div>
		</div>
	</div>
	<div class="ul-table ul-table_responsive">
		<ul>
			<li class="thead">
				<div class="pull-left">
					<span class="col-8">部门</span>
					<span class="col-6">姓名</span>
					<span class="col-6">职位</span>
					<span class="col-4">类型</span>
					<span class="col-15">时间</span>
					<span class="col-8">经度</span>
					<span class="col-8">纬度</span>
					<span class="col-12">IP</span>
					<span class="col-20">地理位置</span>
				</div>
				<div class="pull-right"></div>
				<div class="auto ">
					备注
				</div>
			</li>
			<if condition="!empty($list)">
				<li class="no-data">
					没找到数据
				</li>
				<else/>
				<form method="post" action="" id="form_data">
					<foreach name="list" val="vo">
						<li class="tbody">
							<div class="pull-left">
								<span class="col-8">{$vo.dept_name}</span>
								<span class="col-6">{$vo.name}</span>
								<span class="col-6">{$vo.position_name}</span>
								<span class="col-4">{$vo.type|sign_type}</span>
								<span class="col-15">{$vo.sign_date}</span>
								<span class="col-8">{$vo.latitude}</span>
								<span class="col-8">{$vo.longitude}</span>
								<span class="col-12">{$vo.ip}</span>
								<span class="col-20">
								<a href="#" title='{$vo.location}' onclick="winopen('{:url('read','id='.$vo['id'])}',704,510)">{$vo.location}</a></span>
							</div>
							<div class="pull-right">
								
							</div>
							<div class="auto ">
								<span class="col-12">{$vo.content}</span>
							</div>
						</li>
					</foreach>
				</form>
				<div class="pagination">
					{$page}
				</div>
			</if>
		</ul>
	</div>

</block>
<block name="js">
	<script type="text/javascript">
		function add() {
			window.open("{:url('add')}", "_self");
		}


		$(document).ready(function() {
			set_return_url(null);
		});

	</script>
</block>